home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / utils / benchtrash / install_benchtrash < prev    next >
Text File  |  1999-01-01  |  14KB  |  413 lines

  1. ; $VER: Install_BenchTrash 40.4 (28th February 1998)
  2. ; Script to install BenchTrash version 1.24 and up
  3. ; © 1997,98 THOR - Software
  4. ;
  5. ; The installer software is copyrighted © 1993 CBM
  6. ;
  7.  
  8. ; tell the user that we're 0% done
  9. (complete 0)
  10.  
  11. ;=============================================================================
  12. ; useful procedure
  13.  
  14. (procedure TERMINATE (makeassign "..BenchTrash..")
  15.  
  16. )
  17.  
  18. ;==========================================================================
  19. ; termination stuff
  20.  
  21. (onerror (TERMINATE))
  22.  
  23. ;==========================================================================
  24. ; get current WB version
  25. (set #version (/ (getversion "LIBS:version.library") 65536))
  26.  
  27. ;get language specific strings
  28. ;==========================================================================
  29. ; English strings
  30.  
  31. (set default_lang 4)
  32.  
  33. (set #yes "Yes")
  34. (set #no  "No")
  35.  
  36. (set #which-disk
  37. (cat "Where should I install BenchTrash?"
  38. ))
  39.  
  40. (set #which-disk-help
  41. (cat "This section lets you choose where the "
  42.      "the BenchTrash program should go. It defaults to "
  43.      "the SYS:WBStartup drawer so this program gets "
  44.      "launched during booting.\n"
  45.      "No drawer will be created.\n\n"
  46.      @askdir-help
  47. ))
  48.  
  49. (set #move-old-1
  50. (cat "Copy"
  51. ))
  52.  
  53. (set #move-old-2
  54. (cat "Skip"
  55. ))
  56.  
  57.  
  58. (set #bt-newicons
  59. (cat "Shall I install the NewIcons version of BenchTrash?"
  60. ))
  61.  
  62. (set #bt-newicons-help
  63. (cat "You may choose here to install a better looking NewIcons "
  64.      "version of the BenchTrash icon. This requires, however, the "
  65.      "newicons.library, but looks better for screens with more "
  66.      "colors. Thanks to Claudio Pucci for drawing this icon."
  67. ))
  68.  
  69. (set #trash-newicons
  70. (cat "Shall I install the NewIcons version of the Trashcan icon?"
  71. ))
  72.  
  73. (set #trash-newicons-help
  74. (cat "You may choose here to install a better looking NewIcons "
  75.      "version of the Trashcan icon, to replace the usual icon "
  76.      "stored in Trashcan.info that comes with the workbench.\n"
  77.      "This requires, however, the "
  78.      "newicons.library, but looks better for screens with more "
  79.      "colors. Thanks to Claudio Pucci for drawing this icon."
  80. ))
  81.  
  82. (set #do-locale
  83. (cat    "Which languages do you want to install?"
  84. ))
  85.  
  86. (set #locale-help
  87. (cat    "BenchTrash can be localized to various languages. "
  88.         "Please select the languages you want to install."
  89.         "English is built in, btw."
  90. ))
  91.  
  92. (set #copy-help
  93. (cat    "O.K. to install the BenchTrash Guide?"
  94. ))
  95.  
  96. (set #copy-help-help
  97. (cat    "The BenchTrash guide is a documentation of "
  98.         "the BenchTrash program.\n"
  99.         "If you aren't "
  100.         "really low on disk space, you should install it."
  101. ))
  102.  
  103. (set #help-dir
  104. (cat    "Please select the drawer to install the help-guide:"
  105. ))
  106.  
  107. (set #help-help
  108. (cat    "BenchTrash comes with an online help guide, using Commodore's "
  109.         "AmigaGuide or MultiView program. Please select the drawer to copy "
  110.         "this database to."
  111. ))
  112.  
  113.  
  114. (set #browser-where
  115. (cat    "Please locate your favorite AmigaGuide browser:"
  116. ))
  117.  
  118. (set #browser-help
  119. (cat    "Please select a program that can display AmigaGuide files. "
  120.         "This should be AmigaGuide or Multiview. As a last resort, "
  121.         "select MORE or Ed, that can be found in the Utilities or "
  122.         "C: drawer of your workbench disk."
  123. ))
  124.  
  125. (set #copy-extras
  126. (cat    "Shall I install the BenchTrash extras?"
  127. ))
  128.  
  129. (set #copy-extras-help
  130. (cat    "The Extras programs can be used to unmount a volume "
  131.         "by dragging its icon onto the benchtrash. They consist "
  132.         "of one script and one tiny program.\n"
  133.         "The script will be copied to the S: drawer and "
  134.         "the command will go into C:.\n"
  135.         "Please consult the ReadMe file in the Extras drawer "
  136.         "in this archive on how to use them."
  137. ))
  138.  
  139.  
  140. (set #exit-not-found
  141. (cat    "Unable to find your file \"%s\" - DOS error %ld "
  142.         "- installation aborted. "
  143. ))
  144.  
  145. (set #exit-text
  146. (cat    "Installation of BenchTrash done. Hope you enjoy it..."
  147. ))
  148.  
  149. ;==========================================================================
  150. ;say hi !
  151. (welcome)
  152.  
  153. ;==========================================================================
  154. ; now copy BenchTrash to target
  155.  
  156. (set #target    (askdir (prompt #which-disk)
  157.                         (help   #which-disk-help)
  158.                         (default "SYS:WBStartup")
  159.                 )
  160. )
  161.  
  162. (set @default-dest #target)
  163.  
  164. (copyfiles
  165.         (source "BenchTrash")
  166.         (infos)
  167.         (noposition)
  168.         (dest #target)
  169. )
  170.  
  171. ;===========================================================================
  172. ;Install newicons ?
  173. (complete 20)
  174.  
  175. (set #pi-bt-newicons
  176.         (askbool        (prompt #bt-newicons)
  177.                         (help #bt-newicons-help)
  178.                         (default 0)
  179.                         (choices #yes #no)
  180.         )
  181. )
  182.  
  183. (if #pi-bt-newicons
  184.         (copyfiles
  185.                 (source "NewIcons/BenchTrash.info")
  186.                 (dest #target)
  187.         )
  188. )
  189.  
  190.  
  191. (set #pi-trash-newicons
  192.         (askbool        (prompt #trash-newicons)
  193.                         (help #trash-newicons-help)
  194.                         (default 0)
  195.                         (choices #yes #no)
  196.         )
  197. )
  198.  
  199. (if #pi-trash-newicons
  200.         (copyfiles
  201.                 (source "NewIcons/Trashcan.info")
  202.                 (dest "SYS:Trashcan.info")
  203.         )
  204. )
  205.  
  206. ;==========================================================================
  207. (complete 20)
  208. ;add language-specific if 2.1 or higher
  209. (if (>= #version 38)
  210.         ;then
  211.         (
  212.                 (set #language (askoptions      (prompt #do-locale)
  213.                                                 (help #locale-help)
  214.                                                 (default -1)
  215.                                                 (choices "English"
  216.                                                          "Deutsch"
  217.                                                          "Italiano"
  218.                                                          "Français"
  219.                                                          "Greek"
  220.                                                          "Svenska"
  221.                                                          "suomi"
  222.                                                          "Español"
  223.                                                          "Norsk"
  224.                                                          "ÃeÓtina"
  225.                                                          "Português"
  226.                                                          "Türkçe"
  227.                                                 )
  228.                                 )
  229.                 )
  230.  
  231.                 (if (IN #language 1)
  232.                         (if (exists "LOCALE:Catalogs/Deutsch")
  233.                                 (copyfiles
  234.                                         (source "Deutsch/BenchTrash.catalog")
  235.                                         (dest   "LOCALE:Catalogs/Deutsch/")
  236.                                 )
  237.                         )
  238.                 )
  239.  
  240.                 (if (IN #language 2)
  241.                         (if (exists "LOCALE:Catalogs/Italiano")
  242.                                 (copyfiles
  243.                                         (source "Italiano/BenchTrash.catalog")
  244.                                         (dest   "LOCALE:Catalogs/Italiano/")
  245.                                 )
  246.                         )
  247.                 )
  248.  
  249.                 (if (IN #language 3)
  250.                         (if (exists "LOCALE:Catalogs/Français")
  251.                                 (copyfiles
  252.                                         (source "Français/BenchTrash.catalog")
  253.                                         (dest   "LOCALE:Catalogs/Français/")
  254.                                 )
  255.                         )
  256.                 )
  257.  
  258.                 (if (IN #language 4)
  259.                         (if (exists "LOCALE:Catalogs/Greek")
  260.                                 (copyfiles
  261.                                         (source "Greek/BenchTrash.catalog")
  262.                                         (dest   "LOCALE:Catalogs/Greek/")
  263.                                 )
  264.                         )
  265.                 )
  266.  
  267.                 (if (IN #language 5)
  268.                         (if (exists "LOCALE:Catalogs/Svenska")
  269.                                 (copyfiles
  270.                                         (source "Svenska/BenchTrash.catalog")
  271.                                         (dest   "LOCALE:Catalogs/Svenska/")
  272.                                 )
  273.                         )
  274.                 )
  275.  
  276.                 (if (IN #language 6)
  277.                         (if (exists "LOCALE:Catalogs/Suomi")
  278.                                 (copyfiles
  279.                                         (source "Suomi/BenchTrash.catalog")
  280.                                         (dest   "LOCALE:Catalogs/Suomi/")
  281.                                 )
  282.                         )
  283.                 )
  284.  
  285.                 (if (IN #language 7)
  286.                         (if (exists "LOCALE:Catalogs/Español")
  287.                                 (copyfiles
  288.                                         (source "Español/BenchTrash.catalog")
  289.                                         (dest   "LOCALE:Catalogs/Español/")
  290.                                 )
  291.                         )
  292.                 )
  293.  
  294.                 (if (IN #language 8)
  295.                         (if (exists "LOCALE:Catalogs/Norsk")
  296.                                 (copyfiles
  297.                                         (source "Norsk/BenchTrash.catalog")
  298.                                         (dest   "LOCALE:Catalogs/Norsk/")
  299.                                 )
  300.                         )
  301.                 )
  302.  
  303.                 (if (IN #language 9)
  304.                         (if (exists "LOCALE:Catalogs/ÃeÓtina")
  305.                                 (copyfiles
  306.                                         (source "ÃeÓtina/BenchTrash.catalog")
  307.                                         (dest   "LOCALE:Catalogs/ÃeÓtina/")
  308.                                 )
  309.                         )
  310.                 )
  311.  
  312.  
  313.                 (if (IN #language 10)
  314.                         (if (exists "LOCALE:Catalogs/Português")
  315.                                 (copyfiles
  316.                                         (source "Português/BenchTrash.catalog")
  317.                                         (dest   "LOCALE:Catalogs/Português/")
  318.                                 )
  319.                         )
  320.                 )
  321.  
  322.                 (if (IN #language 11)
  323.                         (if (exists "LOCALE:Catalogs/Türkçe")
  324.                                 (copyfiles
  325.                                         (source "Türkçe/BenchTrash.catalog")
  326.                                         (dest   "LOCALE:Catalogs/Türkçe/")
  327.                                 )
  328.                         )
  329.                 )
  330.  
  331.         )
  332. )
  333.  
  334. (complete 40)
  335. ;===========================================================================
  336. ;ask user to install the BenchTrash-guide
  337. (if (> @user-level 1)
  338.         (set #do-help   (askbool        (prompt #copy-help)
  339.                                         (help #copy-help-help)
  340.                                         (default 1)
  341.                                         (choices #yes #no)
  342.                         )
  343.         )
  344.         (set #do-help 1)
  345. )
  346.  
  347. (if #do-help
  348.         (
  349.                 (set #where-guide       (askdir         (prompt #help-dir)
  350.                                                         (help   #help-help)
  351.                                                         (default "SYS:")
  352.                                         )
  353.                 )
  354.  
  355.                 (if #where-guide
  356.                         (
  357.                                 (copyfiles
  358.                                         (source "BenchTrash.Guide")
  359.                                         (dest #where-guide)
  360.                                 )
  361.                                 (copyfiles
  362.                                         (source "BenchTrash.Guide.info")
  363.                                         (dest #where-guide)
  364.                                 )
  365.  
  366.                                 (set #guide-path (askfile       (prompt #browser-where)
  367.                                                                 (help #browser-help)
  368.                                                                 (default "SYS:Utilities/MultiView")
  369.                                                 )
  370.                                 )
  371.  
  372.                                 (if #guide-path
  373.                                         (tooltype
  374.                                                 (dest (tackon #where-guide "BenchTrash.Guide"))
  375.                                                 (setdefaulttool #guide-path)
  376.                                         )
  377.                                 )
  378.  
  379.                         )
  380.                 )
  381.         )
  382. )
  383. ;==========================================================================
  384. (complete 80)
  385. (if (> @user-level 1)
  386.         (set #do-extras (askbool        (prompt #copy-extras)
  387.                                         (help #copy-extras-help)
  388.                                         (default 0)
  389.                                         (choices #yes #no)
  390.                         )
  391.         )
  392.         (set #do-extras 0)
  393. )
  394.  
  395. (if #do-extras
  396.         (
  397.                 (copyfiles      (source "Extras/ResolveDeviceName")
  398.                                 (dest   "C:")
  399.                 )
  400.  
  401.                 (copyfiles      (source "Extras/RemoveDevice")
  402.                                 (dest   "S:")
  403.                 )
  404.         )
  405. )
  406.  
  407. ;==========================================================================
  408. (complete 100)
  409.  
  410. (TERMINATE)
  411.  
  412. (exit #exit-text)
  413.